package models

type DeviceMetric struct {
	ID        string  `json:"id" gorm:"column:id;primaryKey;autoIncrement;type:int;size:64;comment:主键"`
	RobotID   string  `json:"robot_id" gorm:"column:robot_id;index:robot_metric,priority:1;type:string;size:40;comment:机器id"`
	Name      string  `json:"name" gorm:"column:name;index:robot_metric,priority:2;type:string;size:40;comment:环境因子名称"`
	Value     float64 `json:"value" gorm:"column:value;type:float;size:64;index:robot_metric,priority:3;commnet:环境因子的值"`
	CreatedAt int64   `json:"created_at" gorm:"column:created_at;autoCreateTime;type:int;size:64;index:robot_metric,priority:4;comment:创建时间"`
}

// TableName 指定表名
func (DeviceMetric) TableName() string {
	return "device_metric"
}

// 模式自动注册
func init() {
	Models = append(Models, &DeviceMetric{})
}

type DeviceMetricTpl struct {
	DeviceMetric
}

// TableName 指定表名
func (DeviceMetricTpl) TableName() string {
	return "device_metric_tpl"
}
func (DeviceMetricTpl) Unimplemented() {

}
